package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.YlTitleControlMapper;
import com.ruoyi.system.domain.YlTitleControl;
import com.ruoyi.system.service.IYlTitleControlService;

/**
 * 职称管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-02-19
 */
@Service
public class YlTitleControlServiceImpl implements IYlTitleControlService 
{
    @Autowired
    private YlTitleControlMapper ylTitleControlMapper;

    /**
     * 查询职称管理
     * 
     * @param titleId 职称管理主键
     * @return 职称管理
     */
    @Override
    public YlTitleControl selectYlTitleControlByTitleId(Long titleId)
    {
        return ylTitleControlMapper.selectYlTitleControlByTitleId(titleId);
    }

    /**
     * 查询职称管理列表
     * 
     * @param ylTitleControl 职称管理
     * @return 职称管理
     */
    @Override
    public List<YlTitleControl> selectYlTitleControlList(YlTitleControl ylTitleControl)
    {
        return ylTitleControlMapper.selectYlTitleControlList(ylTitleControl);
    }

    /**
     * 新增职称管理
     * 
     * @param ylTitleControl 职称管理
     * @return 结果
     */
    @Override
    public int insertYlTitleControl(YlTitleControl ylTitleControl)
    {
        ylTitleControl.setCreateTime(DateUtils.getNowDate());
        return ylTitleControlMapper.insertYlTitleControl(ylTitleControl);
    }

    /**
     * 修改职称管理
     * 
     * @param ylTitleControl 职称管理
     * @return 结果
     */
    @Override
    public int updateYlTitleControl(YlTitleControl ylTitleControl)
    {
        ylTitleControl.setUpdateTime(DateUtils.getNowDate());
        return ylTitleControlMapper.updateYlTitleControl(ylTitleControl);
    }

    /**
     * 批量删除职称管理
     * 
     * @param titleIds 需要删除的职称管理主键
     * @return 结果
     */
    @Override
    public int deleteYlTitleControlByTitleIds(Long[] titleIds)
    {
        return ylTitleControlMapper.deleteYlTitleControlByTitleIds(titleIds);
    }

    /**
     * 删除职称管理信息
     * 
     * @param titleId 职称管理主键
     * @return 结果
     */
    @Override
    public int deleteYlTitleControlByTitleId(Long titleId)
    {
        return ylTitleControlMapper.deleteYlTitleControlByTitleId(titleId);
    }
}
